package com.wu.ssm.tomcat;

/**
 * Created by wzf on 2018/11/11/011.
 */
public abstract class  MyServlet {
    public void service(MyRequest request, MyResponse response) {

        //判断是调用doget 还是 dopost
        if ("get".equalsIgnoreCase(request.getMethod())) {
            this.doGet(request, response);
        } else {
            this.doPost(request, response);
        }

    }

    public abstract void doGet(MyRequest request, MyResponse response);

    public abstract void doPost(MyRequest request, MyResponse response);

}
